import requests

# url = 'https://www.qidian.com/chapter/1040765595/806596284/'
# headers={
#     "user-agent":
#     'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36',
#     'cookie':'supportwebp=true; newstatisticUUID=1761639638_1243755078; _csrfToken=REeZa032DEnJfU5GERyrnW8DFOtLPOdHqnq4aLQn; Hm_lvt_f00f67093ce2f38f215010b699629083=1761639640; HMACCOUNT=8BBA8F8C9281CC78; fu=1275688934; e1=%7B%22l6%22%3A%22%22%2C%22l7%22%3A%22%22%2C%22l1%22%3A3%2C%22l3%22%3A%22%22%2C%22pid%22%3A%22qd_p_qidian%22%2C%22eid%22%3A%22qd_A1003%22%7D; e2=%7B%22l6%22%3A%22%22%2C%22l7%22%3A%22%22%2C%22l1%22%3A3%2C%22l3%22%3A%22%22%2C%22pid%22%3A%22qd_p_qidian%22%2C%22eid%22%3A%22qd_A1002%22%7D; supportWebp=true; abPolicies=%7B%22g12%22%3A0%7D; traffic_search_engine=; se_ref=; traffic_utm_referer=https%3A%2F%2Fwww.baidu.com%2Flink; Hm_lpvt_f00f67093ce2f38f215010b699629083=1761644227; w_tsfp=ltvuV0MF2utBvS0Q76vvkE+sET8vcT04h0wpEaR0f5thQLErU5mD0IB+usnwOHLf6sxnvd7DsZoyJTLYCJI3dwMdTMSYctoTiF6Zktdz1YkTBBQ2QJ3ZWlRLcegm6TRFKXhCNxS00jA8eIUd379yilkMsyN1zap3TO14fstJ019E6KDQmI5uDW3HlFWQRzaLbjcMcuqPr6g18L5a5T/f4w75JFgmVesRg0aU0SgcBisjskK5c+1cMxT/cc6uSqA='
#     }
# res = requests.get(url,headers)
# print(res.text)

# import requests
# from bs4 import BeautifulSoup
#
# url = 'https://www.qidian.com/book/1042507923/'
# headers = {
#     'User-Agent': 'Mozilla/5.0'
# }
# response = requests.get(url, headers=headers)
# print(response.status_code)
# print(response.text)
# soup = BeautifulSoup(response.text, 'lxml')
#
# books = []
# for item in soup.select('div.book-img-text ul li h2 a'):
#     title = item.text
#     link = 'https:' + item['href']
#     books.append((title, link))
# print(books)

# from curl_cffi import requests
# from util.headers import get_header
# url = 'https://www.qidian.com/book/1042507923/'
# response = requests.get(url, headers=get_header(),impersonate="chrome120")
# print(response.text)